package smartgrid;

import java.util.GregorianCalendar;
import java.util.List;
import javax.ejb.Local;
import smartgrid.exceptions.CantRemoveFromDBexception;
import smartgrid.exceptions.ContractNotExistsException;
import smartgrid.exceptions.FacebookAccountDisabledException;

@Local
public interface AnnotationInterface {

    /**
     * Returns a list of Annotations of one Facebook Account
     * 
     * @param facebookUID Facebook Account UID
     * @return list of annotations
     */
    List<Annotation> getFacebookAccountAnnotations(String facebookUID) throws FacebookAccountDisabledException;

    /**
     * Create one Annotation to one Facebook Account and on Contract
     * 
     * @param FacebookUID Facebook Account UID
     * @param contractNumber Contract Number   
     * @param annotationName Annotation Name or description
     * @param calendar Date of the annotation
     * @return If success returns one Annotation Object
     *          otherwise, null
     */
    Annotation insertAnnotation(String FacebookUID, String contractNumber, String annotationName, GregorianCalendar calendar) throws FacebookAccountDisabledException, ContractNotExistsException;

    /**
     * Returns a list of Annotations of one Contract of one Facebook Account
     * 
     * @param facebookUID Facebook Account UID
     * @param contractNumber  Contracts Number
     * @return list of annotations
     */
    List<Annotation> getContractFacebookAccountAnnotations(String facebookUID,  String contractNumber) throws FacebookAccountDisabledException, ContractNotExistsException;

    /**
     * remove one Annotation from one Facebook Account
     * 
     * @param facebookUID Facebook account UID
     * @param contractNumber Contract Number
     * @param annotationID Annotation primary Key
     * @throws CantRemoveFromDBexception 
     */
    void removeAnnotation(String facebookUID, String contractNumber, Integer annotationID) throws FacebookAccountDisabledException, ContractNotExistsException, CantRemoveFromDBexception;
}